#ifndef GAMEISC_H
#define GAMEISC_H

#include "GameSettings.h"

class CGameServer;

/*
* Classe CGameISC
* -> Communique avec le CoreServer
*/
class CGameISC
{
public:
	CGameISC(CISCSettings* settings, CGameServer* server);

	bool init(CNetwork* network);

	bool run();

private:
	CISCSettings* m_settings;

	CGameServer* m_server;

	struct CoreConnection
	{
		CNetConnector *Connector;

		s64 NextConnect;

		bool IsWaitingForAuthAnswer;

		int Id;

		CoreConnection()
			: Connector(0)
			, NextConnect(1)
			, IsWaitingForAuthAnswer(false)
			, Id(0)
		{
		}
	} m_connection;

	bool _handlePacket();

	void _cmdHandler_authAnswer();
};

#endif // GAMEISC_H